package com.tech.zhidengxian.config;

import com.tech.zhidengxian.model.constant.ImageType;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class InterceptorConfig implements WebMvcConfigurer {

    @Value("${file.origin.path}")
    private String originPath;

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
//        registry.addResourceHandler("/image/goods/**").addResourceLocations("file:"+originPath+ ImageType.GOODS_TYPE);
//        registry.addResourceHandler("/image/user/**").addResourceLocations("file:"+originPath+ImageType.USER_TYPE);

    }
}
